package com.qiyu.mall.user.provider.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.qiyu.mall.user.provider.entity.ShareHistroyPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * @author idea
 * @data 2020/2/12
 */
@Mapper
public interface ShareHistroyDao extends BaseMapper<ShareHistroyPO> {


    @Update("update t_share_histroy set valid_status=1 where ca_id=#{caId} and product_id=#{productId} and account_id=#{accountId}")
    Integer updateShareHistory(@Param("caId")int caId,@Param("productId")int productId,@Param("accountId")int accountId);

    @Update("update t_share_histroy set valid_status=1 where  product_id=#{productId} and account_id=#{accountId}")
    Integer updateOldShareHistory(@Param("productId")int productId,@Param("accountId")int accountId);
}
